package cn.tedu;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class StarterConfigClient {
    @Value("${date}")
    String date;

    @Value("${test1.test2.text}")
    String testValue;

    /**
     * 验证读取到的properties属性在本地能否正常使用
     * @return
     */
    @RequestMapping("testValue")
    public String testValue() {
        return testValue;
    }

    public static void main(String[] args) {
        SpringApplication.run(StarterConfigClient.class, args);
    }
}
